<template>
  <div class="app-container">
    <!--工具栏-->
    <div class="head-container">

      <div>
        <!-- 搜索 -->
        <el-input v-model="query.xm" clearable size="small" placeholder="输入姓名" style="width: 170px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
        <el-input v-model="query.sfz" clearable size="small" placeholder="输入身份证" style="width: 170px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
        <rrOperation :crud="crud" />
      </div>
      <!--表格渲染-->
      <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
        <el-table-column type="selection" width="55" />
        <el-table-column align="center" prop="aac003" label="姓名" width="130" />
        <el-table-column align="center" prop="aab004" label="单位名称" width="130" />
        <el-table-column align="center" prop="akc170" label="审批类别" width="150" />
        <el-table-column align="center" prop="akb021" label="定点机构名称" width="150" />
        <el-table-column align="center" prop="aae030" label="开始时间" width="150" />
        <el-table-column align="center" prop="aae031" label="终止时间" width="150" />

        <el-table-column align="center" prop="aac002" label="证件号码" width="150" />
        <el-table-column align="center" prop="akc551" label="医疗照护类别" width="150" />
        <el-table-column align="center" prop="aae006" label="现住址" width="130" />
        <el-table-column align="center" prop="akc552" label="家人/监护人姓名" width="130" />
        <el-table-column align="center" prop="aae005" label="联系电话" width="150" />
        <el-table-column align="center" prop="akc553" label="家属/监护人电话" width="150" />
        <el-table-column align="center" prop="akc554" label="申请原因" width="150" />
        <el-table-column align="center" prop="akc555" label="意见" width="130" />
        <el-table-column align="center" prop="aka120" label="疾病编码" width="150" />

        <el-table-column align="center" prop="akc501" label="ADL1大便" width="130" />
        <el-table-column align="center" prop="akc502" label="ADL2小便" width="130" />
        <el-table-column align="center" prop="akc503" label="ADL3修饰" width="150" />
        <el-table-column align="center" prop="akc504" label="ADL4用厕" width="150" />
        <el-table-column align="center" prop="akc505" label="ADL5进食" width="150" />
        <el-table-column align="center" prop="akc506" label="ADL6转移" width="130" />
        <el-table-column align="center" prop="akc507" label="ADL7活动" width="150" />
        <el-table-column align="center" prop="akc508" label="ADL8穿衣" width="150" />
        <el-table-column align="center" prop="akc509" label="ADL9上下楼梯" width="130" />
        <el-table-column align="center" prop="akc510" label="ADL10洗澡" width="150" />

        <el-table-column align="center" prop="akc511" label="总得分" width="130" />
        <el-table-column align="center" prop="akc512" label="评估人" width="130" />
        <el-table-column align="center" prop="akc513" label="评估日期" width="150" />
        <el-table-column align="center" prop="aae036" label="经办时间" width="150" />
        <el-table-column align="center" prop="aae011" label="经办人" width="150" />
        <el-table-column align="center" prop="akc514" label="中心复核评分" width="150" />
      </el-table>
      <!--分页组件-->
      <pagination />
    </div>
  </div>
</template>

<script>
import crudZhsq from '@/api/business/zhsq'
import CRUD, { presenter, header, form } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
import { mapGetters } from 'vuex'

const defaultForm = { aab034Name: null, aac001: null, aac003: null, aac002: null, aac008: null, akc021: null, cardno: null, aac031: null, aab034Code: null, aac008Code: null, akc021Code: null, aac031Code: null }
export default {
  name: 'Ryxx',
  components: { pagination, rrOperation },
  mixins: [presenter(), header(),
    form(function() {
      return Object.assign({ hljg: { bisHljgId: this.bisHljgId }}, defaultForm)
    })],
  dicts: ['xb', 'yjsgx', 'ccs', 'zhzt', 'ccstcqh', 'sqlb'],
  cruds() {
    return CRUD({ title: '人员信息', url: 'api/generalQuery/queryZhbxxx', query: { bisHljgId: '' }, idField: 'bisZhsqId', sort: 'accrymEnd,desc', crudMethod: { ...crudZhsq }})
  },
  data() {
    return {
      dialogCancleFormVisible: false,
      dialogBhFormVisible: false,
      dialogThFormVisible: false,
      permission: {
        add: ['admin', 'zhsq:add'],
        edit: ['admin', 'zhsq:edit'],
        del: ['admin', 'zhsq:del']
      }
    }
  },
  computed: {
    ...mapGetters([
      'user'
    ])
  },
  methods: {
    // 钩子：在获取表格数据之前执行，false 则代表不获取数据
    [CRUD.HOOK.beforeRefresh]() {
      return true
    }
  }
}
</script>

<style scoped>
</style>
